<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>雷达图使用</title>
		<script src="../js/echarts.min.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			#nav {
				width: 600px;
				height: 400px;
			}
		</style>
	</head>
	<body>
		<div id="nav">

		</div>
		<script type="text/javascript">
			var mCharts = echarts.init(document.getElementById('nav'))
			var dataMax = [{
					name: '易用性',
					max: 100
				},
				{
					name: '功能',
					max: 100
				},
				{
					name: '拍照',
					max: 100
				},
				{
					name: '跑分',
					max: 100
				},
				{
					name: '续航',
					max: 100
				}
			]
			var option = {
				radar: {
					indicator: dataMax, //配置各个维度的最大值
					shape:'circle'//配置雷达图最外层的图形
				},
				series: [{
					type: 'radar',
					label: {
						show: true //显示数值
					},
					areaStyle: {}, //设置区域面积
					
					data: [{
							name: '华为手机1',
							value: [80, 90, 80, 82, 90]
						},
						{
							name: '华为手机2',
							value: [70, 82, 75, 70, 78]
						}
					]
				}]
			}
			mCharts.setOption(option)
		</script>
	</body>
</html>
